package demo2;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
//@RequestMapping("/my")
public class MyCtrl {
    @RequestMapping("/m1")
    public ModelAndView m1(String name){
        ModelAndView m=new ModelAndView("hello","msg","hello:"+name);
        return m;
    }

    @RequestMapping("/showSuc")
    String showSuc(){
        //return "redirect:/m1";
        return "success";
    }

    @RequestMapping("/hello")
    void m3(){
        System.out.println("xxxxxx");
    }



}
